package com.cc.service;

import com.cc.entity.Book;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

public interface BookService {
    //获取全部书籍  作者/书籍名称
    List<Book> getList(@Param("bookName") String bookName, @Param("author") String author);

    //分页
    PageInfo<Book> getPage(String bookName, String author, Integer pageNum);

    //获取书籍详情
    Book getBookInfo(@Param("BookId") Integer BookId);

    //新增书籍
    int saveBook(Book book);

    //修改书籍
    int updateBook(Book book);

    //删除书籍
    int deleteBook(@Param("BookId") Integer BookId);
}
